package com.data.center.dto;

import com.alibaba.excel.annotation.ExcelIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.Objects;

@Data
public class StaffDto extends BaseDto{

    //  忽略该字段，从EXCEL中读取时不进行反序列换
//    @ExcelIgnore
    @ApiModelProperty("人员ID")
    private String staffId;

    @ApiModelProperty("组织ID ")
    private String organizationId;

    @ApiModelProperty("姓名 ")
    private String name;

    @ApiModelProperty("手机")
    private String mobile;

    @ApiModelProperty("电话")
    private String telephone;

    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("传真")
    private String fax;

    @ApiModelProperty("职务 ")
    private String position;

    @ApiModelProperty("状态 ")
    private String status;

    @ApiModelProperty("创建人 ")
    private String creator;

    //  忽略该字段，从EXCEL中读取时不进行反序列换@ExcelIgnore
//    @ExcelIgnore
    @ApiModelProperty("创建时间 ")
    private Date creationTime;

    @ApiModelProperty("最后修改人 ")
    private String modifier;

    //  忽略该字段，从EXCEL中读取时不进行反序列换
//    @ExcelIgnore
    @ApiModelProperty("最后修改时间 ")
    private Date lastModifiedTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof StaffDto)) return false;
        if (!super.equals(o)) return false;
        StaffDto staffDto = (StaffDto) o;
        return Objects.equals(getStaffId(), staffDto.getStaffId());
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), getStaffId());
    }
}
